﻿package mortal.common.swfPlayer.data
{
    import flash.utils.*;
    import mortal.common.swfPlayer.frames.*;

    public class FramesData extends Object
    {
        private static var _dataMap:Dictionary = new Dictionary();

        public function FramesData()
        {
            return;
        }// end function

        public static function setData() : void
        {
            return;
        }// end function

        public static function addData(param1:String, param2:SwfFrames) : void
        {
            _dataMap[param1] = param2;
            return;
        }// end function

        public static function getData(param1:String) : SwfFrames
        {
            return _dataMap[param1];
        }// end function

        public static function clearReference() : void
        {
            var _loc_1:SwfFrames = null;
            for each (_loc_1 in _dataMap)
            {
                
                if (_loc_1.referenceCount > 0)
                {
                    _loc_1.clearReferenceCount();
                }
            }
            return;
        }// end function

        public static function dispose() : void
        {
            var _loc_3:SwfFrames = null;
            var _loc_1:* = getTimer();
            var _loc_2:Boolean = false;
            for each (_loc_3 in _dataMap)
            {
                
                if (_loc_3.referenceCount == 0)
                {
                    if (_loc_3.disposeTime <= _loc_1)
                    {
                        _loc_3.dispose();
                        _loc_2 = true;
                    }
                }
            }
            return;
        }// end function

    }
}
